<form action="" method="post" id="frm_filtrado">
    <table>
        <tr>
            <td>
                <strong>Fecha desde: </strong>
                <input type="text" name="txt_desde" readonly="readonly">
            </td>
            <td>
                <strong>Fecha hasta: </strong>
                <input type="text" name="txt_hasta" readonly="readonly">
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <button type="reset" class="btn_limpar" title="Lipiar los valores">Limpiar</button>
                <button type="submit" class="btn_consultar" title="Consultar el historico">Consultar</button>
            </td>
        </tr>
    </table>
</form>
<div id="pnl_historicos"></div>
<script type="text/javascript">
    $(document).ready(function() {
        var now = new Date();
        var desde = '01/' + ("0" + (now.getMonth() + 1)).slice(-2) + '/' + now.getFullYear();
        $('input[name=txt_desde]').val(desde);
        var hasta = '01/' + ("0" + (now.getMonth() + 2)).slice(-2) + '/' + now.getFullYear();
        $('input[name=txt_hasta]').val(hasta);
        $(".btn_limpar").button({
            icons: {primary: "ui-icon-arrowrefresh-1-s"}
        });
        $(".btn_consultar").button({
            icons: {primary: "ui-icon-search"}
        });
        /*
        $( "input[name=txt_desde]" ).datepicker({
            showOn: "button",
            buttonImage: "images/calendar.gif",
            buttonImageOnly: true,
            changeMonth: true,
            changeYear: true,
            dateFormat: "dd/mm/yy"
        });
        */
        $( "input[name=txt_desde]" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            numberOfMonths: 2,
            dateFormat: "dd/mm/yy",
            onClose: function( selectedDate ) {
              $( "input[name=txt_hasta]" ).datepicker( "option", "minDate", selectedDate );
            }
          });
          $( "input[name=txt_hasta]" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            numberOfMonths: 2,
            dateFormat: "dd/mm/yy",
            onClose: function( selectedDate ) {
              $( "input[name=txt_desde]" ).datepicker( "option", "maxDate", selectedDate );
            }
          });
    });
    $("#frm_filtrado").submit(function() {
        $.post('soli?ac=ls', $("#frm_filtrado").serialize(), function(data) {
            $("#pnl_historicos").html(data);
        }).error(function() {
            $('#pnl_historicos').html('<br/>No se obtuvieron resultados del filtrados');
        });
        $("#pnl_historicos").html('<p><img src="images/loading.gif" /><br/>Cargando...</p>');
        return false;
    } );
</script>